﻿namespace Sgr.Sms
{
    /// <summary>
    /// 短信服务提供者
    /// </summary>
    public interface ISmsProvider
    {
        /// <summary>
        /// 短信服务提供者名称
        /// </summary>
        string Name { get; }

        /// <summary>
        /// 发送验证码短信
        /// </summary>
        /// <param name="phoneNumber">手机号</param>
        /// <param name="message">内容</param>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns></returns>
        Task<SmsResult> SendAsync(
            string phoneNumber,
            string message,
            CancellationToken cancellationToken = default);
    }
}